package com.cy;

public class MathDemo {
    public static void main(String[] args) {
        System.out.println(Math.abs(250));
        System.out.println(Math.abs(-250));//传入什么返回什么类型
        System.out.println(Math.ceil(12.01));
        System.out.println(Math.floor(13.99));
        System.out.println(Math.round(25.525));//返回int
        System.out.println(Math.max(58,65));
        System.out.println(Math.pow(2.5,2.0));
        System.out.println((int)(Math.random()*100)+1);//random 产生[0,1)的随机数
    }
}
